package cn.bone.ou.community.controller;

import cn.bone.base.bean.CommonResult;
import cn.bone.ou.community.param.MngParam;
import cn.bone.ou.community.service.ICommunityMngService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

@RestController
@RequestMapping("/ou/mng")
public class CommunityMngController {

    @Resource
    private ICommunityMngService communityMngService;

    @RequestMapping("/login")
    public CommonResult login(@Valid MngParam.LoginParam param){
        return communityMngService.login(param);
    }

    @RequestMapping("/info")
    public CommonResult info(@Valid MngParam.InfoParam param){
        return communityMngService.info(param);
    }

    @RequestMapping("/modifyHeadImg")
    public CommonResult modifyHeadImg(@Valid MngParam.ModifyHeadImgParam param){
        return communityMngService.modifyHeadImg(param);
    }

    @RequestMapping("/modifyRealName")
    public CommonResult modifyRealName(@Valid MngParam.ModifyRealNameParam param){
        return communityMngService.modifyRealName(param);
    }

    @RequestMapping("/modifyPhoneNum")
    public CommonResult modifyPhoneNum(@Valid MngParam.ModifyPhoneNumParam param){
        return communityMngService.modifyPhoneNum(param);
    }

    @RequestMapping("/modifyPass")
    public CommonResult modifyPass(@Valid MngParam.ModifyPassParam param){
        return communityMngService.modifyPass(param);
    }

    @RequestMapping("/list")
    public CommonResult list(@Valid MngParam.ListParam param){
        return communityMngService.list(param);
    }

    @RequestMapping("/add")
    public CommonResult add(@Valid MngParam.AddParam param){
        return communityMngService.add(param);
    }

    @RequestMapping("/modify")
    public CommonResult modify(@Valid MngParam.ModifyParam param){
        return communityMngService.modify(param);
    }

    @RequestMapping("/delete")
    public CommonResult delete(@Valid MngParam.DeleteParam param){
        return communityMngService.delete(param);
    }

    @RequestMapping("/usable")
    public CommonResult usable(@Valid MngParam.UsableParam param){
        return communityMngService.usable(param);
    }

    @RequestMapping("/disable")
    public CommonResult disable(@Valid MngParam.DisableParam param){
        return communityMngService.disable(param);
    }

    @RequestMapping("/resetPass")
    public CommonResult resetPass(@Valid MngParam.ResetPassParam param){
        return communityMngService.resetPass(param);
    }
}
